@extends('layout.layout')

@section('content')
<!-- 左侧分类管理 -->
    <h1 class="page-title">分类修改 <small></small></h1>
    <div class="span8">
    <div class="widget">
    <div class="widget">
                    <form action="{{url('/admin/cate/update')}}" method="post">
                        <div class="widget-header">
                            <h4>选择分类</h4>
                        </div>
                        <div class="widget-content">
                            <select name="pid" id="select-box" style="background: rgba(0,0,0,0.5)">
                                <option value="0"/>顶级分类
                                @foreach($cates as $k=>$v)
                                 @if($v->id == $cate->pid)
                                    <option value="{{$v->id}}" selected/>{{$v->name}}
                                 @else
                                    <option value="{{$v->id}}"/>{{$v->name}}
                                 @endif  
                                @endforeach
                            </select>
                            <br />
                        </div>
                        <h4>分类名</h4>
                        <input name="name" class="span3" id="focusedInput" type="text" value="{{$cate->name}}" />
                        <br />
                        <h4>状态</h4>
                        <select name="status" id="select-box" style="background: rgba(0,0,0,0.5)">
                                    <option value="1" @if($cate->status == 1) selected @endif/>启用
                                    <option value="2" @if($cate->status == 2) selected @endif/>未启用
                            </select>
                        <br />
                        <input type="hidden" name="id" value="{{$cate->id}}">
                        <input type="hidden" name="xpid" value="{{$cate->pid}}">
                        {{csrf_field()}}
                        <button type="submit" class="btn btn-primary icon-ok">修改分类</button>
                        <button type="reset" class="btn icon-refresh">重置</button>
                   
                    </form>
                    
    </div>
    </div>
    </div>
    <!-- 右侧信息 -->
    <div class="span4">
            <div class="widget">
                        <div class="widget-header">
                            <h4>
                                信息
                                <a href="#" class="btn btn-inverse pull-right">View All</a>
                            </h4>
                        </div>
                        <div class="widget-content">
                            <ul class="news-list">
                                <li>
                                    <a href="#">
                                        <div class="news-media">
                                            <img alt="" src="/public/admin/assets/img/user-profile-pic-4.png" />
                                        </div>
                                        <div class="news-info">
                                            <h4 class="news-title">21 Inspiring Clean Website Designs</h4>
                                            <span class="news-date">Posted On Feb <i class="date">21, 2013</i></span>
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="news-media">
                                            <img alt="" src="/public/admin/assets/img/user-profile-pic-2.png" />
                                        </div>
                                        <div class="news-info">
                                            <div class="news-title">The Benefits of Working on Freelance Projects</div>
                                            <div class="news-date">Posted On Feb <span class="date">21, 2013</span></div>
                                        </div>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="news-media">
                                            <img alt="" src="/public/admin/assets/img/user-profile-pic-3.png" />
                                        </div>
                                        <div class="news-info">
                                            <div class="news-title">The Flexible Web</div>
                                            <div class="news-date">Posted On Feb <span class="date">21, 2013</span></div>
                                        </div>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
        </div>  
@endsection
